package com.ezops.util;

import org.springframework.context.ApplicationContext;


public final class ApplicationContextUtils {
	
	private static ApplicationContext applicatinContext;

	public static ApplicationContext getContext() {
		return applicatinContext;
	}

	public static void setContext(ApplicationContext context) {
		applicatinContext = context;
	}
	
	/**
	 * Return the singleton instance of the HibernateSession
	 * @return
	 */
	public static HibernateSessionTransactionTLSContext getHibernateSessionTransactionTLSContext(){	
		 return (HibernateSessionTransactionTLSContext)applicatinContext.getBean("hibernateSessionTransactionContext");
			
		
	}

}
